using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_ItemUsedRightMap : EntityTypeConfiguration<t_ItemUsedRight>
    {
        public t_ItemUsedRightMap()
        {
            // Primary Key
            this.HasKey(t => new { t.FTypeID, t.FUserID, t.FItemID, t.FRightValue });

            // Properties
            this.Property(t => t.FTypeID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FUserID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FItemID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FRightValue)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            // Table & Column Mappings
            this.ToTable("t_ItemUsedRight");
            this.Property(t => t.FTypeID).HasColumnName("FTypeID");
            this.Property(t => t.FUserID).HasColumnName("FUserID");
            this.Property(t => t.FItemID).HasColumnName("FItemID");
            this.Property(t => t.FRightValue).HasColumnName("FRightValue");
        }
    }
}
